package com.newsReader.category.model;

import java.util.List;

import com.eova.common.base.BaseModel;

public class CateUser extends BaseModel<CateUser> {
	/**
	 * TODO（用一句话描述这个变量表示什么）
	 */

	private static final long serialVersionUID = 1L;
	
	
	public static final CateUser dao = new CateUser();
	

	//添加中间表
	public boolean insertCateUser(CateUser cate,int cateId,int userId){
		cate.set("cateId", cateId);
		cate.set("userId", userId);
		return cate.save();
	}
	
	//中间表
	public List<CateUser> cateUser(int userId){
		StringBuffer sql = new StringBuffer();
		sql.append("SELECT id,userId,cateId,style from n_cateUser where userId=?");
		return this.find(sql.toString(),userId);
	}
}
